package com.spring.boot.controller;

import com.spring.boot.response.Result;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @PreAuthorize("hasAnyAuthority('ROLE_test')")
    @GetMapping("/test")
    public Result<?> test(){
        return Result.OK("fffffffffffffffffff");
    }
}
